<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<c:if test="${ empty json }">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-2.1.0.js"></script>
<title>itb001 : person information</title>
<style type="text/css">
input {
    #background-color: #DEB887;
    border: 1px none;
    height: 30px;
    padding: 2px;
    width: 500px;
}
img {
    #border: 1px dashed;
    width: 230px;
}
#detail {
    background-color: #F5F5F5;
    border: 2px solid #EE82EE;
    padding: 6px;
    width: 750px;
}
td {
    border: 1px solid;
    vertical-align: top;
}
table {
    width: auto;
}
button {
    height: 100px;
    width: 200px;
}
</style>
</head>
<body>
	<div id="detail">
		<c:if test="${ not empty person }">
		<table>
		<tr>
			<td>
				<input type="text" value="${ person.citizenId }"> <br>
				
				<input type="text" value="${ person.preNameThai }"> <br>
				<input type="text" value="${ person.firstNameThai }"><br>
				<input type="text" value="${ person.lastNameThai }"><br>
				
				<input type="text" value="${ person.preNameEng }"><br>
				<input type="text" value="${ person.firstNameEng }"><br>
				<input type="text" value="${ person.lastNameEng }"><br>
			
				<input type="text" value="${ person.birthDateStr }"><br>
				<input type="text" value="${ person.expiredDateStr }"><br>
				<input type="text" value="${ person.addressStr }"><br>
				<input type="text" value="${ person.sex }"><br>
			</td>
			<td>
				<img alt="picture" src="${ person.byteToString() }"><br>
			</td>
			</tr>
		</table>
		
		<button value="Show" onclick="window.location.reload();"> reload </button>
		
		</c:if>
	</div>
</body>
</html>
</c:if>
<c:if test="${ not empty json }">
	${ json }
</c:if>